package com.cxhc.system.service.app.impl;

import java.util.List;

import com.cxhc.common.annotation.Integral;
import com.cxhc.common.enums.IntegralType;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.RpBuildingSiteCheck;
import com.cxhc.system.mapper.app.RpBuildingSiteCheckMapper;
import com.cxhc.system.service.app.IRpBuildingSiteCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 工地检查Service业务层处理
 * 
 * @author Dhq
 * @date 2024-09-23
 */
@Service
public class RpBuildingSiteCheckServiceImpl implements IRpBuildingSiteCheckService
{
    @Autowired
    private RpBuildingSiteCheckMapper rpBuildingSiteCheckMapper;

    /**
     * 查询工地检查
     * 
     * @param id 工地检查主键
     * @return 工地检查
     */
    @Override
    public RpBuildingSiteCheck selectRpBuildingSiteCheckByID(Long id)
    {
        return rpBuildingSiteCheckMapper.selectRpBuildingSiteCheckByID(id);
    }

    /**
     * 查询工地检查列表
     * 
     * @param rpBuildingSiteCheck 工地检查
     * @return 工地检查
     */
    @Override
    public List<RpBuildingSiteCheck> selectRpBuildingSiteCheckList(RpBuildingSiteCheck rpBuildingSiteCheck)
    {
        return rpBuildingSiteCheckMapper.selectRpBuildingSiteCheckList(rpBuildingSiteCheck);
    }

    /**
     * 新增工地检查
     * 
     * @param rpBuildingSiteCheck 工地检查
     * @return 结果
     */
    @Override
    @Integral(IntegralType.BUILDING_SITE)
    public int insertRpBuildingSiteCheck(RpBuildingSiteCheck rpBuildingSiteCheck)
    {
        return rpBuildingSiteCheckMapper.insertRpBuildingSiteCheck(rpBuildingSiteCheck);
    }

    /**
     * 修改工地检查
     * 
     * @param rpBuildingSiteCheck 工地检查
     * @return 结果
     */
    @Override
    public int updateRpBuildingSiteCheck(RpBuildingSiteCheck rpBuildingSiteCheck)
    {
        rpBuildingSiteCheck.setUpdateTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
        return rpBuildingSiteCheckMapper.updateRpBuildingSiteCheck(rpBuildingSiteCheck);
    }

    /**
     * 批量删除工地检查
     * 
     * @param iDs 需要删除的工地检查主键
     * @return 结果
     */
    @Override
    public int deleteRpBuildingSiteCheckByIDs(Long[] iDs)
    {
        return rpBuildingSiteCheckMapper.deleteRpBuildingSiteCheckByIDs(iDs);
    }

    /**
     * 删除工地检查信息
     * 
     * @param iD 工地检查主键
     * @return 结果
     */
    @Override
    public int deleteRpBuildingSiteCheckByID(Long iD)
    {
        return rpBuildingSiteCheckMapper.deleteRpBuildingSiteCheckByID(iD);
    }
}
